<html>
<body>
    <p>This tests that a javascript: URL subframe can access a sibling javascript: URL subframe.</p>
    <iframe id="firstSubFrame" name="firstSubFrame"></iframe>
    <iframe id="secondSubFrame" name="secondSubFrame"></iframe>
    <script>
        if (window.testRunner) {
            testRunner.dumpAsText();
            testRunner.dumpChildFrames();
            testRunner.waitUntilDone();
        }

        var firstURL = "javascript:\"<html>"
            + "<body>"
            +     "<p id='accessMe'>FAIL: Cross frame access from a sibling javascript: URL was denied.</p>"
            +     "<p>Inner iframe.</p>"
            + "</body>"
            + "</html>\"";

        var iframe = document.getElementById("firstSubFrame");
        iframe.src = firstURL;

        var secondURL = "javascript:\"<html>"
            + "<body>"
            +     "<p>Inner iframe.</p>"
            +     "<scr" + "ipt>"
            +         "parent.frames['firstSubFrame'].document.getElementById('accessMe').innerHTML = 'PASS: Cross frame access from a sibling javascript: URL was allowed!';"
            +         'if (parent.testRunner)'
            +             'parent.testRunner.notifyDone();'
            +     "</scri" + "pt>"
            + "</body>"
            + "</html>\"";

        iframe = document.getElementById("secondSubFrame");
        iframe.src = secondURL;
    </script>
</body>
</html>
